<?php

namespace app\common\model;

class AccountModel extends BaseModel
{
    protected $name = 'gy_account';
    protected $id   = 'account_id';

    public function password($password, $shalt = "3412")
    {
        return base64_encode(sha1($password . '###' . $shalt));
    }


    public function getToken($userName, $password, $shalt = "3412")
    {
        return base64_encode(sha1($userName . "###" . $password . '###' . $shalt));
    }

}